Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation API core #8348

Open
wants to merge 249 commits into
base: develop
Choose a base branch
from
Open

Validation API core #8348

wants to merge 249 commits into from

Conversation

zhiltsov-max
Copy link
Contributor

@zhiltsov-max zhiltsov-max commented Aug 26, 2024

Motivation and context

Depends on #8272
Depends on #8321

  • Added server API for creation of a GT job on task creation
  • Added server support for task creation with GT pool (aka Honeypot)
  • Added new GT job frame selection method random_per_job, which guarantees each annotation job gets the specified GT overlap, making each annotation job validatable
  • Added new GT job frame count selection options based on task size % and segment size %
  • Changed GT job creation parameter "frames" to accept relative frame ids instead of absolute (source data) ones
  • Allowed frame deletion in GT jobs. Deleted GT frames are considered excluded from validation, so should not appear in quality reports. Frame removal from a simple GT job (in tasks without honeypots) doesn't remove task frames, only the GT job frames.

Server API changes:

  • GET /api/tasks/{id}/ got a new validation_mode field, reflecting the current validation configuration (immutable)
  • POST /api/tasks/{id}/data got a new validation_params field, which allow to enable GT / GT_POOL validation for a task on its creation

Tasks with Honeypots

This validation mode affects task creation, so can only be used in task creation. It cannot be disabled or changed after the task is created. When honeypots are configured, each job in the task gets several extra validation frames.
The pool of available frames and the number of validation frames per job are specified by the user at task creation.

Limitations:

  • This validation mode can only be used with random frame ordering.
  • Inherently, this assumes that job_frame_mapping and overlap cannot be used in such tasks.
  • Track annotations are prohibited in tasks with honeypots enabled.

Honeypot frames and GT annotations are accessible via the GT job, as in the case with regular GT jobs. However, unlike regular tasks with GT jobs, task annotation import affects the GT job as well in tasks with honeypots. Task annotation export contains only GT annotations on validation frames (so, only the GT copy of validation frames is included).

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

Summary by CodeRabbit

  • New Features

    • Introduced a server setting to disable media chunks on the local filesystem, enhancing configurability.
    • Added tracking for the last assignee update date in quality reports, improving task management.
    • Enhanced job chunk identifiers for better clarity and uniqueness.
  • Bug Fixes

    • Resolved memory management issues and refined job assignment logic in video processing.
  • Documentation

    • Updated API schema with new enhancements related to job management and validation processes.
  • Chores

    • Updated package dependencies and added new configuration settings for Redis in the Helm chart.

…sk creation (put chunk creation into the end), need to update chunk generation approach to to per job
cvat/apps/dataset_manager/task.py Outdated Show resolved Hide resolved
cvat/apps/dataset_manager/task.py Outdated Show resolved Hide resolved
cvat/apps/dataset_manager/util.py Outdated Show resolved Hide resolved
cvat/apps/engine/backup.py Outdated Show resolved Hide resolved
@zhiltsov-max
Copy link
Contributor Author

@klakhov ,

There is a corner case when Im trying to create a task with 100% honeypots. So it gives me the task with just 1 gt job and 0 regular jobs. Is there a usecase for that? maybe we shoud prohibit such case?

Hm, I think yes, it should produce a validation error during task creation.

I don't see any changes in .rego. Will non-admin users be able to compute quality reports after this pr?

I think it will be ether in a separate PR or in the PR with allocation reports, it seems to be the most relevant place.

@zhiltsov-max
Copy link
Contributor Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Sep 27, 2024

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Comment on lines 457 to 461
if data.tracks and db_data.validation.mode == models.ValidationMode.GT_POOL:
# Only tags and shapes can be used in tasks with GT pool
raise ValidationError("Tracks are not supported when task validation mode is {}".format(
models.ValidationMode.GT_POOL
))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, as far as I understand we cant use tracks in tasks with HP.
But when I try to add a track in UI I get this error:
image

Seems error message is wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhiltsov-max What is the nature of such restriction?
I understand that tracks with interpolation do not make sense in honeypot jobs, but is it the only reason?

Copy link
Contributor Author

@zhiltsov-max zhiltsov-max Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frames are in the random order, tracks make no sense in such case. If the frames were ordered, honeypots could be (a) clearly identifiable or (b) could not be reused multiple times. Simple GT job doesn't have such a problem, so it can be used if frame ordering or tracks are required in the task.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense if each frame of the track is a keyframe.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just do not understand the reason why we forced this restriction.
If a user does it, why not. It is the user's decision.

Copy link

sonarcloud bot commented Sep 30, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants